//
// Created by martin on 2/27/22.
//

#include "muduo/base/copyable.h"
#include <stdio.h>
#include <memory>

class Test : public muduo::copyable
{
public:
    Test() : value_(0)
    { }
    explicit Test(int v) : value_(v)
    { value_ = v; }

    int getValue() const
    { return value_; }
private:
    int value_;
};

int main()
{
    Test t1(100), t2(200);
    printf("t1 = %d, t2 = %d\n", t1.getValue(), t2.getValue());
    std::swap(t1, t2);
    printf("t1 = %d, t2 = %d\n", t1.getValue(), t2.getValue());
    return 0;
}